package com.heima.feign.wemedia.sensitive;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.heima.model.admin.dtos.SensitiveDto;
import com.heima.model.media.dtos.SensitiveResponseDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author Fuqiang
 * @since :2023-04-07
 */
@FeignClient(value = "leadnews-wemedia",contextId = "sensitive")
public interface WmSensitiveFeignClients {


    /**
     * 保存敏感词信息
     */
    @PostMapping("/api/v1/sensitive/feign/save")
    void saveSensitive(@RequestBody SensitiveDto dto);

    /**
     * 查询列表
     */
    @PostMapping("/api/v1/sensitive/feign/list")
    Page<SensitiveResponseDTO> findList(@RequestBody SensitiveDto dto);

    /**
     * 修改敏感词
     */
    @PostMapping("/api/v1/sensitive/feign/update")
    void updateSensitive(@RequestBody SensitiveDto dto);

    /**
     * 删除敏感词
     */
    @DeleteMapping("/api/v1/sensitive/feign/del/{id}")
    void deleteSensitive(@PathVariable("id") Integer id);
}
